function add (a, b, c, d) {
    return a + b + c + d;
}

Function.prototype.curry = function (...args) {
    return (...rest) => {
        return this.call(null, ...args, ...rest)
    }
}

let x = add.curry(2, 2, 3, 4) // 传部分参数

console.log(x())  // 传剩余参数